#include "teamdialog_2.h"
#include "ui_teamdialog_2.h"
#include <QString>
#include <stdio.h>
#include<stdlib.h>
#include<errno.h>
#include<ctype.h>
#include<string.h>
#include<netdb.h>
#include<unistd.h>
#include<sys/types.h>
#include<netinet/in.h>
#include<sys/socket.h>
#include<arpa/inet.h>


TeamDialog_2::TeamDialog_2(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::TeamDialog_2)
{
    ui->setupUi(this);
    ui->lineEdit_3->setEchoMode(QLineEdit::Password);
    ui->lineEdit_4->setEchoMode(QLineEdit::Password);
    ui->lineEdit->setAlignment(Qt::AlignHCenter);
    ui->lineEdit->setPlaceholderText("绑定手机");
    ui->lineEdit_2->setAlignment(Qt::AlignHCenter);
    ui->lineEdit_2->setPlaceholderText("用户名");
    ui->lineEdit_3->setAlignment(Qt::AlignHCenter);
    ui->lineEdit_4->setAlignment(Qt::AlignHCenter);
}

TeamDialog_2::~TeamDialog_2()
{
    delete ui;
}

void TeamDialog_2::on_pushButton_2_clicked()//返回登录
{
    accept();
}

void TeamDialog_2::on_pushButton_clicked()//确认注册
{
    QString phone = ui->lineEdit->text();
    QString username = ui->lineEdit_2->text();
    QString pwd = ui->lineEdit_3->text();
    QString tpwd = ui->lineEdit_4->text();
    //char phone[20] = ui->lineEdit->text();
    //char username = ui->lineEdit_2->text();
    //char pwd = ui->lineEdit_3->text();
    //char tpwd = ui->lineEdit_4->text();
    //InputUsrPswdR(username, pwd,tpwd);
    //SendUsrPswd(sockfd, username,pwd,tpwd);
    //if((ch = GetSockChar(sockfd))=='D')
    //{
      //  printf("注册成功！\n");
    //}
    //return OK;
}
